Tables [dbo].[PaymentMain]
Properties
PropertyValue
Created10:31:32 AM Tuesday, March 02, 2010
Last Modified3:54:36 PM Wednesday, March 07, 2012
Columns
NameData TypeMax Length (Bytes)Allow NullsDefault
Cluster Primary Key PK_PaymentMain: PaymentKeyForeign Keys FK_PaymentMain_UniformRegistry: [dbo].[UniformRegistry].PaymentKeyPaymentKeyuniqueidentifier16
No
Amountdecimal(18,4)9
No
((0))
Foreign Keys FK_PaymentMain_PaymentApplicationRestrictionRef: [dbo].[PaymentApplicationRestrictionRef].PaymentApplicationRestrictionCodePaymentApplicationRestrictionCodeint4
Yes
FinancialEntityKeyuniqueidentifier16
No
PaymentDatedatetime8
No
AmountHomedecimal(18,4)9
Yes
CurrencyCodenchar(3)6
Yes
Foreign Keys FK_PaymentMain_PaymentMain_Original: [dbo].[PaymentMain].OriginalPaymentKeyOriginalPaymentKeyuniqueidentifier16
Yes
Foreign Keys FK_PaymentMain_ContactMain_Payor: [dbo].[ContactMain].PayorContactKeyIndexes IX_PaymentMain_PayorContactKey: PayorContactKeyPayorContactKeyuniqueidentifier16
No
SummaryDisplaynvarchar(50)100
Yes
Foreign Keys FK_PaymentMain_AccessMain: [dbo].[AccessMain].AccessKeyAccessKeyuniqueidentifier16
No
Foreign Keys FK_PaymentMain_UserMain_CreatedBy: [dbo].[UserMain].CreatedByUserKeyCreatedByUserKeyuniqueidentifier16
No
CreatedOndatetime8
No
Foreign Keys FK_PaymentMain_UserMain_UpdatedBy: [dbo].[UserMain].UpdatedByUserKeyUpdatedByUserKeyuniqueidentifier16
No
UpdatedOndatetime8
No
Foreign Keys FK_PaymentMain_SystemEntity: [dbo].[SystemEntity].SystemEntityKeySystemEntityKeyuniqueidentifier16
No
Foreign Keys FK_PaymentMain_GroupMain_Owner: [dbo].[GroupMain].OwnerGroupKeyOwnerGroupKeyuniqueidentifier16
Yes
PaymentMethodKeyuniqueidentifier16
Yes
PaymentReferenceDatanvarchar(50)100
Yes
PaymentDetailKeyuniqueidentifier16
Yes
MarkedForDeleteOndatetime8
Yes
FinalBatchKeyuniqueidentifier16
Yes
OriginatingBatchKeyuniqueidentifier16
Yes
BatchLineStatusCodeint4
Yes
BatchStatusMessagenvarchar(200)400
Yes
Indexes Indexes
NameColumnsUnique
Cluster Primary Key PK_PaymentMain: PaymentKeyPK_PaymentMainPaymentKey
Yes
IX_PaymentMain_PayorContactKeyPayorContactKey
Foreign Keys Foreign Keys
NameColumns
FK_PaymentMain_AccessMainAccessKey->[dbo].[AccessMain].[AccessKey]
FK_PaymentMain_ContactMain_PayorPayorContactKey->[dbo].[ContactMain].[ContactKey]
FK_PaymentMain_GroupMain_OwnerOwnerGroupKey->[dbo].[GroupMain].[GroupKey]
FK_PaymentMain_PaymentApplicationRestrictionRefPaymentApplicationRestrictionCode->[dbo].[PaymentApplicationRestrictionRef].[PaymentApplicationRestrictionCode]
FK_PaymentMain_PaymentMain_OriginalOriginalPaymentKey->[dbo].[PaymentMain].[PaymentKey]
FK_PaymentMain_SystemEntitySystemEntityKey->[dbo].[SystemEntity].[SystemEntityKey]
FK_PaymentMain_UniformRegistryPaymentKey->[dbo].[UniformRegistry].[UniformKey]
FK_PaymentMain_UserMain_CreatedByCreatedByUserKey->[dbo].[UserMain].[UserKey]
FK_PaymentMain_UserMain_UpdatedByUpdatedByUserKey->[dbo].[UserMain].[UserKey]
SQL Script
CREATE TABLE [dbo].[PaymentMain]
(
[PaymentKey] [uniqueidentifier] NOT NULL,
[Amount] [decimal] (18, 4) NOT NULL CONSTRAINT [DF_PaymentMain_Amount] DEFAULT ((0)),
[PaymentApplicationRestrictionCode] [int] NULL,
[FinancialEntityKey] [uniqueidentifier] NOT NULL,
[PaymentDate] [datetime] NOT NULL,
[AmountHome] [decimal] (18, 4) NULL,
[CurrencyCode] [nchar] (3) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[OriginalPaymentKey] [uniqueidentifier] NULL,
[PayorContactKey] [uniqueidentifier] NOT NULL,
[SummaryDisplay] [nvarchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[AccessKey] [uniqueidentifier] NOT NULL,
[CreatedByUserKey] [uniqueidentifier] NOT NULL,
[CreatedOn] [datetime] NOT NULL,
[UpdatedByUserKey] [uniqueidentifier] NOT NULL,
[UpdatedOn] [datetime] NOT NULL,
[SystemEntityKey] [uniqueidentifier] NOT NULL,
[OwnerGroupKey] [uniqueidentifier] NULL,
[PaymentMethodKey] [uniqueidentifier] NULL,
[PaymentReferenceData] [nvarchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[PaymentDetailKey] [uniqueidentifier] NULL,
[MarkedForDeleteOn] [datetime] NULL,
[FinalBatchKey] [uniqueidentifier] NULL,
[OriginatingBatchKey] [uniqueidentifier] NULL,
[BatchLineStatusCode] [int] NULL,
[BatchStatusMessage] [nvarchar] (200) COLLATE SQL_Latin1_General_CP1_CI_AS NULL
) ON [PRIMARY]

GO
ALTER TABLE [dbo].[PaymentMain] ADD CONSTRAINT [PK_PaymentMain] PRIMARY KEY CLUSTERED ([PaymentKey]) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_PaymentMain_PayorContactKey] ON [dbo].[PaymentMain] ([PayorContactKey]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[PaymentMain] ADD CONSTRAINT [FK_PaymentMain_AccessMain] FOREIGN KEY ([AccessKey]) REFERENCES [dbo].[AccessMain] ([AccessKey])
GO
ALTER TABLE [dbo].[PaymentMain] ADD CONSTRAINT [FK_PaymentMain_ContactMain_Payor] FOREIGN KEY ([PayorContactKey]) REFERENCES [dbo].[ContactMain] ([ContactKey])
GO
ALTER TABLE [dbo].[PaymentMain] ADD CONSTRAINT [FK_PaymentMain_GroupMain_Owner] FOREIGN KEY ([OwnerGroupKey]) REFERENCES [dbo].[GroupMain] ([GroupKey])
GO
ALTER TABLE [dbo].[PaymentMain] ADD CONSTRAINT [FK_PaymentMain_PaymentApplicationRestrictionRef] FOREIGN KEY ([PaymentApplicationRestrictionCode]) REFERENCES [dbo].[PaymentApplicationRestrictionRef] ([PaymentApplicationRestrictionCode])
GO
ALTER TABLE [dbo].[PaymentMain] ADD CONSTRAINT [FK_PaymentMain_PaymentMain_Original] FOREIGN KEY ([OriginalPaymentKey]) REFERENCES [dbo].[PaymentMain] ([PaymentKey])
GO
ALTER TABLE [dbo].[PaymentMain] ADD CONSTRAINT [FK_PaymentMain_SystemEntity] FOREIGN KEY ([SystemEntityKey]) REFERENCES [dbo].[SystemEntity] ([SystemEntityKey])
GO
ALTER TABLE [dbo].[PaymentMain] ADD CONSTRAINT [FK_PaymentMain_UniformRegistry] FOREIGN KEY ([PaymentKey]) REFERENCES [dbo].[UniformRegistry] ([UniformKey])
GO
ALTER TABLE [dbo].[PaymentMain] ADD CONSTRAINT [FK_PaymentMain_UserMain_CreatedBy] FOREIGN KEY ([CreatedByUserKey]) REFERENCES [dbo].[UserMain] ([UserKey])
GO
ALTER TABLE [dbo].[PaymentMain] ADD CONSTRAINT [FK_PaymentMain_UserMain_UpdatedBy] FOREIGN KEY ([UpdatedByUserKey]) REFERENCES [dbo].[UserMain] ([UserKey])
GO
Uses
Used By